<?php

namespace Parser;

//数据解析数据
class Repetition
{
    /**
     * @var string|void $lastCompany
     */
    protected $lastCompany;

    /**
     * @var string|void $lastStartAt
     */
    protected $lastStartAt;

    /**
     * @var string|void $lastEndTime
     */
    protected $lastEndTime;

    /**
     * @var array $lastCoverage
     */
    protected $lastCoverage;

    /**
     * @var string|void $lastSignTime
     */
    protected $lastSignTime;

    /**
     * @var string|void $status
     */
    protected $status = false;

    /**
     * @var string|void $license
     */
    protected $license;

    /**
     * @var string|void lastPolicy
     */
    protected $lastPolicy;

    /**
     * @param string $lastStartAt
     */
    public function setLastStartAt(string $lastStartAt): void
    {
        $this->lastStartAt = $lastStartAt;
    }

    /**
     * @param string $lastSignTime
     */
    public function setLastSignTime(string $lastSignTime): void
    {
        $this->lastSignTime = $lastSignTime;
    }

    /**
     * @param array $lastCoverage
     */
    public function setLastCoverage(array $lastCoverage): void
    {
        $this->lastCoverage = $lastCoverage;
    }

    /**
     * @param string $lastCompany
     */
    public function setLastCompany(string $lastCompany): void
    {
        $this->lastCompany = $lastCompany;
    }

    /**
     * @return array
     */
    public function getLastCoverage(): array
    {
        return $this->lastCoverage;
    }

    /**
     * @return string|void
     */
    public function getLastCompany()
    {
        return $this->lastCompany;
    }

    /**
     * @return string|void
     */
    public function getLastSignTime()
    {
        if ($this->lastSignTime) {
            $this->lastSignTime = date('Y-m-d H:i:s', strtotime($this->lastSignTime));
        }
        return $this->lastSignTime;
    }

    /**
     * @return string|void
     */
    public function getLastStartAt()
    {
        if ($this->lastStartAt) {
            $this->lastStartAt = date('Y-m-d H:i:s', strtotime($this->lastStartAt));
        }
        return $this->lastStartAt;
    }

    /**
     * @param string $status
     */
    public function setStatus(string $status): void
    {
        $this->status = $status;
    }

    /**
     * @return string|void
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * @param string $license
     */
    public function setLicense(string $license): void
    {
        $this->license = $license;
    }

    /**
     * @return string|void
     */
    public function getLicense()
    {
        return $this->license;
    }

    /**
     * @return string|void
     */
    public function getLastPolicy()
    {
        return $this->lastPolicy;
    }

    /**
     * @param string $lastPolicy
     */
    public function setLastPolicy(string $lastPolicy): void
    {
        $this->lastPolicy = $lastPolicy;
    }

    /**
     * @return string|void
     */
    public function getLastEndTime()
    {
        if ($this->lastEndTime) {
            $this->lastEndTime = date('Y-m-d H:i:s', strtotime($this->lastEndTime));
        }

        return $this->lastEndTime;
    }

    /**
     * @param string $lastEndTime
     */
    public function setLastEndTime(string $lastEndTime): void
    {
        $this->lastEndTime = $lastEndTime;
    }
}
